package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 所属学校配置表
 *
 * @author hhj
 * @since 2022-12-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_school_config")
@Schema(name = "EduSchoolConfig", title = "所属学校配置表", description = "所属学校配置表实体类")
public class EduSchoolConfig extends Model<EduSchoolConfig> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "schoolConfigId", title = "学校配置id")
    @TableId(value = "school_config_id", type = IdType.ASSIGN_ID)
    private String schoolConfigId;

    @Schema(name = "schoolId", title = "学校id")
    @TableField(value = "school_id")
    private String schoolId;
    @Schema(name = "schoolNature", title = "学校性质0.公办 1.民办")
    @TableField(value = "school_nature")
    private String schoolNature;

    @Schema(name = "schoolCategory", title = "学校类别")
    @TableField(value = "school_category")
    private String schoolCategory;

    @Schema(name = "orderNo", title = "排序字段")
    @TableField(value = "order_no")
    private Integer orderNo;

    @Schema(name = "configType", title = "配置类别")
    @TableField(value = "config_type")
    private String configType;

    @Schema(name = "configTypeName", title = "类别名称")
    @TableField(value = "config_type_name")
    private String configTypeName;

    @Schema(name = "enrolment", title = "计划招生人数")
    @TableField(value = "enrolment")
    private Integer enrolment;

    @Schema(name = "year", title = "年度")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "startAge", title = "允许就读出生开始时间")
    @TableField(value = "start_age")
    private Date startAge;

    @Schema(name = "endAge", title = "允许就读出生结束时间")
    @TableField(value = "end_age")
    private Date endAge;

    @Schema(name = "startTime", title = "招生开始时间")
    @TableField(value = "start_time")
    private Date startTime;

    @Schema(name = "endTime", title = "招生结束时间")
    @TableField(value = "end_time")
    private Date endTime;

    @Schema(name = "classNum", title = "班级数")
    @TableField(value = "class_num")
    private Integer classNum;

    @Schema(name = "zsFlag", title = "是否直升班")
    @TableField(value = "zs_flag")
    private String zsFlag;

    @Schema(name = "authStatus", title = "审核状态")
    @TableField(value = "auth_status")
    private String authStatus;

    @Schema(name = "authRemarks", title = "审核意见")
    @TableField(value = "auth_remarks")
    private String authRemarks;

    @Schema(name = "authTime", title = "审核时间")
    @TableField(value = "auth_time")
    private Date authTime;

    @Schema(name = "authUserId", title = "审核人")
    @TableField(value = "auth_user_id")
    private String authUserId;

    @Schema(name = "status", title = "是否启用0.禁用1.启用")
    @TableField(value = "status", updateStrategy = FieldStrategy.NOT_NULL)
    private String status;

    @Schema(name = "del", title = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "createName", title = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", title = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", title = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", title = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "areaCode", title = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "serialNumEnd", title = "摇号录取截至顺序号")
    @TableField(value = "serial_num_end")
    private Integer serialNumEnd;

    @Schema(name = "fullFlag", title = "是否报满即止 0 否 1是")
    @TableField(value = "full_flag")
    private String fullFlag;

    @Override
    public Serializable pkVal() {
        return this.schoolConfigId;
    }
}
